Mesh FromPartShape/ru

Mesh MeshFromShape‏‎

Расположение в меню
Полигональные Сетки → Создать полигональную сетку из фигуры
Верстаки
Mesh
Быстрые клавиши
Нет
Представлено в версии
-
См. также
Нет

Description

The Mesh_FromPartShape command creates non-parametric mesh objects (Mesh Features) from shape objects (Part Features).

The inverse operation is Part ShapeFromMesh from the Part Workbench.

Usage

  1. Optionally select one or more objects.
  2. There are several ways to invoke the command:
  3. The Tessellation task panel opens.
  4. While the task panel is open you can create a new selection or change an existing selection.
  5. Select the tab for the mesher you wish to use.
  6. Specify the required settings. See Meshers.
  7. Press the OK button to close the task panel and finish the command.

Meshers

These are the available meshers and their settings:

Standard mesher

Mefisto mesher

Netgen mesher

Gmsh mesher

For Linux users: the external Gmsh module is required.

Notes

Preferences

Standard mesher

Gmsh mesher

Properties

See: Mesh Feature.

Scripting

See also: FreeCAD Scripting Basics.

To create a mesh object from a shape object use the meshFromShape method of the MeshPart module. This method has several signatures. The signature determines the mesher that will be used. The example below uses the Mefisto mesher signature.

import FreeCAD, Part, Mesh, MeshPart

cyl = FreeCAD.ActiveDocument.addObject("Part::Cylinder","Cylinder")
FreeCAD.ActiveDocument.recompute()

msh = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = MeshPart.meshFromShape(Shape=cyl.Shape, MaxLength=1)
msh.ViewObject.DisplayMode = "Flat Lines"